﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace ITAP.ShprossesBuilder.Manipulation
{
    public class MouseManagerEvent : IEquatable<MouseManagerEvent>
    {
        private MouseMoveType mouseMoveType;

        public MouseMoveType MouseMoveType
        {
            get { return mouseMoveType; }
            set { mouseMoveType = value; }
        }

        private MouseButtons mouseButton;

        public MouseButtons MouseButton
        {
            get { return mouseButton; }
            set { mouseButton = value; }
        }
        private Keys keyData;

        public Keys Key
        {
            get { return keyData; }
            set { keyData = value; }
        }

        public override int GetHashCode()
        {
            return mouseButton.GetHashCode() + keyData.GetHashCode();
        }

        public MouseManagerEvent(MouseButtons mouseButton, Keys keyData)
        {
            this.mouseButton = mouseButton;
            this.keyData = keyData;

        }

        public MouseManagerEvent(MouseButtons mouseButton, Keys keyData, MouseMoveType mouseMoveType) 
            : this(mouseButton, keyData)
        {
            this.mouseMoveType = mouseMoveType;
        }

        #region IEquatable<MouseManagerEvent> Members

        public bool Equals(MouseManagerEvent other)
        {
                if (this.keyData == other.keyData && this.mouseButton == other.mouseButton)
                    return true;
                else
                    return false;
         
        }

        #endregion
    }
}
